﻿using DirectSell.Model.ManagerNotice;
using DirectSell.Model.Query;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Webdiyer.WebControls.Mvc;

namespace Direct.IDAL.Manager.Notice
{
    /// <summary>
    /// 发布公告仓储接口
    /// </summary>
    public interface INoticeManagerRepository:IBaseManagerRepository
    {
        /// <summary>
        /// 添加公告
        /// </summary>
        /// <param name="req"></param>
        /// <param name="hstable"></param>
        bool NoticeAdd(NoticeReq req);
        /// <summary>
        /// 查询公告列表
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        Task<PagedList<Notices>> GetList(BaseCondition condition);
        /// <summary>
        /// 查一条公告
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Notices QueryNotice(int id);
        /// <summary>
        /// 删除公告
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DelNotice(int id);
        /// <summary>
        /// 修改一条公告
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        bool UpdateNotice(NoticeReq req);
        /// <summary>
        /// 修改公告排序
        /// </summary>
        /// <param name="id"></param>
        /// <param name="sort"></param>
        /// <returns></returns>
        bool UpdateSort(int id, int sort);
    }
}
